package ar.com.mej.dao;

public class Filter {

	public static final int STRING_FILTER = 1;
	public static final int NUMERIC_FILTER = 2;
	public static final int BOOLEAN_FILTER = 3;
	public static final int SPECIAL_FILTER = 4;
	
	public static final String EQUAL_OPERATOR = "=";
	public static final String LIKE_OPERATOR = "like";
	public static final String DISTINCT_OPERATOR = "<>";

	private int type;
	private String attribute;
	private String operator;
	private Object value;
	private String specialFilter;
	private boolean parameter;

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getAttribute() {
		return attribute;
	}

	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}
	
	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public boolean isParameter() {
		return parameter;
	}

	public void setParameter(boolean parameter) {
		this.parameter = parameter;
	}

	public String getSpecialFilter() {
		return specialFilter;
	}

	public void setSpecialFilter(String specialFilter) {
		this.specialFilter = specialFilter;
	}

	public Filter(int type, String attribute,String operator, Object value, boolean parameter) {
		super();
		this.type = type;
		this.attribute = attribute;
		this.operator = operator;
		this.value = value;
		this.parameter = parameter;
	}
	
	public Filter(String specialFilter)
	{
		super();
		this.specialFilter = specialFilter;
		this.type = SPECIAL_FILTER;
	}

	public Filter() {
		super();
	}

}
